71536a
@@ -1030,8 +1030,18 @@
public boolean isReadOnly() throws SQLException {
 
   @Override
   public boolean isValid(int timeout) throws SQLException {
-    // TODO Auto-generated method stub
-    throw new SQLException("Method not supported");
+    if (timeout < 0) {
+      throw new SQLException("timeout value was negative");
+    }
+    boolean rc = false;
+    try {
+      String productName = new HiveDatabaseMetaData(this, client, sessHandle)
+              .getDatabaseProductName();
+      rc = true;
+    } catch (SQLException e) {
+      // IGNORE
+    }
+    return rc;
   }
 
   /*
